import Vue from 'vue'
import Router from 'vue-router'
import logins from '@/components/login'

Vue.use(Router)

Router.prototype.goBack = function() {　　
	this.isBack = true　　 
	window.history.go(-1)
}

export default new Router({
    	routes: [{
			path: '/index',
			name: 'index',
			component: resolve => require(['@/components/index'], resolve),
		},
		{
			path: '/',
			name: 'index',
			component: resolve => require(['@/components/index'], resolve),
		},
		{
			path: '/commodityDetail/:id',
			name: 'commodityDetail',
			component: resolve => require(['@/components/commodityDetail'], resolve),
		},
		{
			path: '/newestDetail/:id',
			name: 'newestDetail',
			component: resolve => require(['@/components/newestDetail'], resolve),
		},
		{
			path: '/commentMore/:id',
			name: 'commentMore',
			component: resolve => require(['@/components/commentMore'], resolve),
		},
		{
			path: '/customerCenter',
			name: 'customerCenter',
			component: resolve => require(['@/components/customerCenter'], resolve),
		},
		{
			path: '/shoppingCart',
			name: 'shoppingCart',
			component: resolve => require(['@/components/shoppingCart'], resolve),
		},
		 
		{
			path: '/order',
			name: 'order',
			component: resolve => require(['@/components/order'], resolve),
		},
		{
			path: '/address',
			name: 'address',
			component: resolve => require(['@/components/address'], resolve),
		},
		{
			path: '/newsAddress',
			name: 'newsAddress',
			component: resolve => require(['@/components/newsAddress'], resolve),
		},
		{
			path: '/editAddress',
			name: 'editAddress',
			component: resolve => require(['@/components/editAddress'], resolve),
		},
		{
			path: '/orderDetail',
			name: 'orderDetail',
			component: resolve => require(['@/components/orderDetail'], resolve),
		},
		{
			path: '/search',
			name: 'search',
			component: resolve => require(['@/components/search'], resolve),
		},
		{
			path: '/forumDetail/:id',
			name: 'forumDetail',
			component: resolve => require(['@/components/forumDetail'], resolve),
		},
		{
			path: '/createStatus',
			name: 'createStatus',
			component: resolve => require(['@/components/createStatus'], resolve),
		},
		{
			path: '/createStatus/createBotany',
			name: 'createBotany',
			component: resolve => require(['@/components/create/createBotany'], resolve),
		},
		{
			path: '/createStatus/sharing',
			name: 'sharing',
			component: resolve => require(['@/components/create/sharing'], resolve),
		},
		{
			path: '/share',
			name: 'share',
			component: resolve => require(['@/components/share'], resolve),
		},
		{
			path: '/createStatus/participate',
			name: 'participate',
			component: resolve => require(['@/components/create/participate'], resolve),
		},
		{
			path: '/conversationDetail/:id',
			name: 'conversationDetail',
			component: resolve => require(['@/components/conversationDetail'], resolve),
		},
		{
			path: '/followDetail',
			name: 'followDetail',
			component: resolve => require(['@/components/followDetail'], resolve),
		},
		{
			path: '/followMore',
			name: 'followMore',
			component: resolve => require(['@/components/followMore'], resolve),
		},

		//capua
		{
			path: '/orderList',
			name: 'orderList',
			component: resolve => require(['@/components/orderList'], resolve),
		},
		 
	]
})